// dlg.txt

//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 13;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "You are at the bottom of a large quarry. Above you, you can see a series of ascending ledges, connected by tunnels. The strong men of the Low Dhaga dig huge rocks out of the wall and fling them down here, where other workers chip them into paving stones and building blocks.";
	text2 = "It is hard, exhausting work, but the Ro take great pride in their toughness.";
	text3 = "However, this quarry is currently closed. No workers are visible. Instead, you see a line of tough warriors, weapons drawn, alertly watching to the north. When you come into view, their leader, standing front and center, waves you forward.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "The quarry consists of a long series of wide galleries, dug out of the way with muscle, sweat, and the occasional application of fiery magic. Some of the rock is still scorched.";
	text2 = "You smell rot in the air, and you hear snatches of speech ahead. It is all gibberish, a series of random phrases. _Come help!_ _I have money!_ _There is an apple._ _I am a person!_";
	text3 = "Ka-wolves. Hungry beasts in human form, not far ahead.";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0 && gf(13,11) == 0;
	text1 = "You look across this workshop and see a figure in the passage on the other side. Not a ka-wolf. A young, deeply-tanned man, dressed in leather.";
	text2 = "He is holding a wooden baton. It is larger than a wand, carved with runes. Crystals hang from long leather strips at the end.";
	text3 = "When he sees you, he laughs. _Our prey comes to us! Truly, our great work is blessed!_ He points the rod at you and shouts. _Go! Kill!_";
	text4 = "He steps into the shadows. You hear the snarling of ka-wolves. They are coming, called by their master's command.";
	code =
		set_dialogue_pic(833);
		sf(this_town,3,1);
		activate_hidden_group(6);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "You emerge out into the open air. You can see the bottom level of the quarry, fifty feet below. Sections of track have been laid ahead, so that rocks can be more easily carried from the wall to the edge and tipped over it.";
	text2 = "To the east, you see a large open space, burrowed out in to the edge of the valley. The man you saw earlier is standing there, waiting for you. At his side is an enormous beast, half-giant and half-boar. It's like a ka-wolf, but way larger and way piggier.";
	text3 = "The Low Dhagan warriors below watch your advance with fascination. This is a chance to display the power of Haven to those who have never experienced it.";
	code =
		sf(this_town,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "__";
	code =
		sf(this_town,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "__";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "This door is barred from the other side.";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "The top of these steps is blocked by many, many tons of rubble. A small team of Havenite magical engineers could clear this mess away in a minute. Alas, your engineers were not available at [F0].";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "Most of the warriors are determined to stay quiet. When you try to talk to them, the man in the middle clears his throat.";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "You put an end to Raider Thresh with one final blow. The raiders are gone. The quarry has been reclaimed.";
	text2 = "When Thresh falls, the rod he was holding starts to smoke. Then it cracks, crumbles, and turns into a pile of ash. Unfortunate. It might have been useful evidence.";
	text3 = "The ka-boar shudders. Then it howls with confusion. The rod was controlling it. The sudden loss of contact drives the massive beast mad.";
	code =
		set_dialogue_pic(833);
		if (gf(13,13) > 0) {
			rs(2); rs(3);
			}
			else if (char_ok(1326) == FALSE)
				rs(3);
	break;
	
begintalknode;
	tag = 17;
	condition = 1;
	text1 = "When you strike the ka-boar, it roars in pain. It starts to turn from side to side. It doesn't want to fight you, but Thresh's rod compels it.";
	text2 = "The enchanted rod is smoking. One of the crystals hanging from its tip shatters. Thresh points it at the boar. _Keep fighting, beast! Destroy the invader!_";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "The wounded ka-boar looks up into the air, raises its hands, and lets out a deep, incoherent howl! Thresh is alarmed. He points his rod and shouts, _Fight! Fight for me!_";
	text2 = "But it doesn't work. The control is broken. The boar turns around, drooling, lost in rage. It tries to charge toward Thresh.";
	text3 = "The wounded ka-boar looks up into the air, raises its hands, and lets out a deep, incoherent howl! Then it stumbles around, confused, unsure who to attack._";
	action = DEP_ON_SDF 13 11 0;
	
begintalknode;
	tag = 19;
	condition = 1;
	text1 = "The Low Dhagan miners have returned to the quarry. They are massive, muscular men, working hard to create quality stonework for their clan (with a small cut going to you).";
	text2 = "They are friendly for Ro, but they don't know anything of great interest. You have a chat, absorb their gratitude, and depart.";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You join the warrior in looking up at the quarry. He stares up at a large ledge, fifty feet above you. _That's where the problem lies, stranger._ Occasionally, a head peers over the edge, looks down at you, and shouts some gibberish.";
	text2 = "Without looking away from his prey, the man says, _I am Pillar Kalika, of the Low Dhaga. We are here to hold this claim. If Umista sent you, you are welcome._";
	text5 = "Pillar Kalika keeps a constant eye on the quarry above. _Be careful. Sometimes, they throw down rocks._";
	action = INTRO;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(13,12) == 0;
	question = "_You are talking to a [P] of Haven._";
	text1 = "Pillar Kalika nods. _Your arrival is news. Some Low Dhagans tried to kill you. We did not approve._ How nice of them.";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(13,12) == 0;
	question = "_Who is Umista?_";
	text1 = "_Oh. He still hasn't sent help? Unsurprising. The Gentle Coast has made him slow and soft._";
	text2 = "_He is in Laskara. If you can help us, he will pay you well. We know Haven has needs._";
	code =
		sf(13,12,1);
	break;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(13,12) == 0;
	question = "_Yes, I have met Umista._";
	text1 = "_Then I hope he told you of our problem. If you help us, he will pay you. We know you need stone._";
	code =
		sf(13,12,1);
	break;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(13,12) == 0;
	question = "_I'm just passing by. I'm not really involved._";
	text1 = "_But you are on the hunt, yes? If you help us, our trader, Umista, is in Laskara. Haven can win a valuable bounty here. We know you need stone._";
	code =
		sf(13,12,1);
	break;

begintalknode;
	state = 10;
	nextstate = 11;
	condition = gf(13,12) > 0;
	question = "_Is this your quarry?_";
	text1 = "_It belongs to our clan. It is a legitimate claim. A precious source of stone, deeded to us by the Gentle Coast._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Legitimate claim?_";
	text1 = "_Normally, the Low Dhagans get what they need from the coast with raids. Folk here are rich, and they think they are better than our ways. Thus, this is just._";
	text2 = "_However, this particular land was bought from them according to Haven's law, with a contract._";

begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_And your clan sent you._";
	text1 = "_Yes. Urgently. We came here, the mountain way. We had to be fast._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_Why are you here, then?_";
	text1 = "_The raids that bother you also lashed at us. Raiders drove us out of this claim. We had to get here quickly, or other Ro warriors would come here, declare this quarry abandoned, and take our claim._";
	text2 = "_It is our way._";

begintalknode;
	state = 10;
	nextstate = 13;
	condition = gf(13,12) > 0;
	question = "_What, exactly, is the problem here?_";
	text1 = "_Our workers and guards were attacked. A force of Low Dhagan raiders and ka-wolves came in the night. They let our folk free, so that they could declare a claim. Now we are here to take it back._";
	text2 = "_It was very strange._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_How is this strange?_";
	text1 = "_The humans fought with ka-wolves. However, our witnesses say that the ka-wolves actually took commands from the humans. Those mindless creatures are not order-takers. We suspect strange magic._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_Do you know anything about the attackers?_";
	text1 = "_It was dark, and our workers left quickly. They saw little._";
	text2 = "_However, one of them said that they saw a huge, hulking figure in the shadows. Perhaps a fantasy brought on by terror. Perhaps not._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_Perhaps I can help you._";
	text1 = "_Perhaps. The tunnel up to the infested tunnels is that way._ He points to the northwest. _If you can kill the invaders, you will be paid._";
	action = END_TALK;
	
begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_Well, good luck. I'll be going._";
	text1 = "Pillar Kalika nods.";
	action = END_TALK;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(13,12) > 0 && gf(13,11) > 0;
	question = "_The raiders are dead._ Tell the tale.";
	text1 = "The warriors listen with fascination. Despite themselves, they can't help but be a little impressed. Pillar Kalika says, _That is quite a tale. My clan will pay you for your efforts._";
	text2 = "_Talk to Umista, in Laskara. He is soft, but he does the business with outsiders. He will deal fairly._";
	action = END_TALK;

	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "At last, you have cornered the young Low Dhagan warrior. He holds the carved wooden rod across his chest, like a shield. He is doing a good job of hiding his fear, now that the end is near.";
	text2 = "He is probably reassured, you would guess, by the hulking boar-man that stands at his side. It snarls and drools, eager to devour everyone around it. The man is constantly tapping the beast with the rod to maintain control.";
	text3 = "The human says, _I hoped you would come. Now is my chance for glory! I am Raider Thresh. Where my fellows failed to kill you, I will succeed._";
	code =
		set_dialogue_pic(833);
		set_attitude(30007,10);
	break;
	
begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "_Aah! What is that giant monster?_";
	text1 = "The beast roars at you, a hideous oinking sound that echoes through the whole valley. _This is my ka-boar. It serves me!_ Not for long, the way it is flailing around.";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_You are one of the raiders who attacked us?_";
	text1 = "_I am. Many war parties came with us, to take our due from the weaklings of the Gentle Coast. And the Dhagans who buy their land._";
	text2 = "_I wanted to kill you myself, but I drew a different lot. If I had found you in the beginning, you would not have lived._ Unlikely.";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_Why did you come here?_";
	text1 = "_This is a declaration! All of the Rokaj knows now that things are changing. Haven is finally challenged. Someone is finally doing something!_";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_Why would you want to kill me?_";
	text1 = "_Because we are the slaves of Haven. You switch between ignoring and tormenting us, as your wealth makes us weak. We must be Rokaj once again._";

begintalknode;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "_Who was your leader?_";
	text1 = "_Who brought us together? Who made us one force and sent us here as one? We don't know. He was only ever called the Wolf. He hides from you as he spreads his wisdom. And gives us new weapons!_ He holds up the baton.";
	text2 = "You note that smoke is starting to rise from the baton. It's a clever toy, but Thresh is pushing the limits of its power.";
	text3 = "_We are determined to be free from Haven!_";
	
begintalknode;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "_What is that baton?_";
	text1 = "_It is a new power, brought to us by the mighty Wolf. We call the mindless and bring them to our will. More forces to fight the might of Haven!_";
	text2 = "You note that smoke is starting to rise from the baton. It's a clever toy, but Thresh is pushing the limits of its power.";
	text3 = "_We are determined to be free from Haven!_";

begintalknode;
	state = 42;
	nextstate = 43;
	condition = 1;
	question = "_That is starting to become clear._";
	text1 = "_It was always true. You were simply fooled. Even your lusty slattern of a Queen. The Ro will show you what we Know and how we Work, but the Deep Truth is always within. We will smile, serve, and then kill, all in one breath!_";
	text2 = "_Now I will fling you from this ledge and leave you smashed on the rocks._";

begintalknode;
	state = 42;
	nextstate = 43;
	condition = 1;
	question = "_The Rokaj is our loyal vassal._";
	text1 = "_Haven is so arrogant, so easily fooled. Even your lusty slattern of a Queen can't see the truth. The Ro will show you what we Know and how we Work, but the Deep Truth is always within. We will smile, serve, and then kill, all in one breath!_";
	text2 = "_Now I will fling you from this ledge and leave you smashed on the rocks._";

begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_Do we really have to fight now?_";
	text1 = "_Try to flee. Try to beg. It doesn't matter. Now I will probably die, but I am a Ro. Even a tiny chance of glory is enough._ He points the baton at you. _Kill!_";
	text2 = "The ka-boar hesitates, confused. Thresh points the baton again. _Go, you! Kill!_ The boar turns toward you.";
	action = END_TALK;
	
begintalknode;
	state = 43;
	nextstate = -1;
	condition = 1;
	question = "_For attacking royalty of Haven, you are condemned to death. Sentence will be carried out immediately._";
	text1 = "Raider Thresh laughs. _It is an honor to be personally doomed by so glorious a figure! Now I will probably die, but I am a Ro. Even a tiny chance of glory is enough._ He points the baton at you. _Kill!_";
	text2 = "The ka-boar hesitates, confused. Thresh points the baton again. _Go, you! Kill!_ The boar turns toward you.";
	action = END_TALK;


	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				